package com.socket;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.ServerSocket;
import java.net.Socket;

public class Server {

    public static final int IP_PORXY=18080;

    public static void main(String[] args) throws IOException {


        ServerSocket serverSocket=new ServerSocket(IP_PORXY);

        while (true){
            System.out.println("Server ....start");
            Socket client=serverSocket.accept();
            BufferedReader br=new BufferedReader(new InputStreamReader(client.getInputStream()));

            System.out.println("Server...begin  ..");
            String data=br.readLine();
            System.out.println(data);
            System.out.println("Server .... end");
            br.close();
            client.close();
        }
    }

}
